package january.test_1_24;

import java.util.Scanner;

public class TestMain1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int cur = 0;
        int m = 0;
        int n = 0;
        int tmp = 0;
        for(int i = 0; i < str.length(); i++) {
            if('0'<=str.charAt(i) && str.charAt(i) <='9') {
                cur = i;
            } else {
                cur = str.length();
            }
            while( i < str.length()&&'0'<=str.charAt(i) && str.charAt(i) <='9') {
                i++;
            }
            tmp = i - cur;
            if(tmp > (m - n)) {
                m = i;
                n = cur;
            }
        }
        for(int i = n ; i < m; i++) {
            System.out.print(str.charAt(i));
        }

    }
}
